package com.gmrz.webauthn.protocol.v1.schema;


import com.google.gson.annotations.SerializedName;

public enum PublicKeyCredentialType {
    @SerializedName("public-key")
    PUBLIC_KEY_CREDENTIAL("public-key");

    private String mValue;

    public String getValue() {
        return this.mValue;
    }

    PublicKeyCredentialType(String value) {
        this.mValue = value;
    }

    public static PublicKeyCredentialType forName(String name) {
        for (PublicKeyCredentialType credentialType : values()) {
            if (credentialType.getValue().equalsIgnoreCase(name)) {
                return credentialType;
            }
        }
        throw new IllegalArgumentException("Invalid credential type: " + name);
    }

    public String toString() {
        return this.mValue;
    }
}
